<?php
class CardState
{
	var $color = 0;
	var $no = -1;
	var $num = 1;
	var $direction = 1;
	var $step = 1;
	var $type = 0;
	var $punished = false;
	
	function __toString()
	{
		return "{\"color\":\"$this->color\",\"no\":$this->no,\"num\":$this->num,\"direction\":$this->direction,\"type\":$this->type,\"step\":$this->step}";
	}
	
	function reset()
	{
		$this->step = 1;
		$this->num = 1;
		if($this->type == WildDraw)
		{
			$this->type = 0;
		}
	}
}